#include "els.h"
int ELSAPI_socket_c_constinit(els_VmObj* vm); // c_constinit()
int ELSAPI_socket_c_AF_INET(els_VmObj* vm); // c_AF_INET()
int ELSAPI_socket_c_SOCK_STREAM(els_VmObj* vm); // c_SOCK_STREAM()
int ELSAPI_socket_c_gethostbyname(els_VmObj* vm); // c_gethostbyname()
int ELSAPI_socket_c_sendtimeout(els_VmObj* vm); // c_sendtimeout()
int ELSAPI_socket_c_recvtimeout(els_VmObj* vm); // c_recvtimeout()
int ELSAPI_socket_c_socket(els_VmObj* vm); // c_socket()
int ELSAPI_socket_c_bind(els_VmObj* vm); // c_bind()
int ELSAPI_socket_c_listen(els_VmObj* vm); // c_listen()
int ELSAPI_socket_c_accept(els_VmObj* vm); // c_accept()
int ELSAPI_socket_c_connect(els_VmObj* vm); // c_connect()
int ELSAPI_socket_c_send(els_VmObj* vm); // c_send()
int ELSAPI_socket_c_recv(els_VmObj* vm); // c_recv()
int ELSAPI_socket_c_close(els_VmObj* vm); // c_close()
#ifdef ELS_CONF_TOKEN_EN
static const char LibScript[]={
10,
99,95,99,111,110,115,116,105,110,105,116,40,41,32,35,-27,-118,-96,-24,-67,-67,-27,-72,-72,-23,-121,-113,-27,-120,-80,-27,-123,-88,-27,-79,-128,-28,-67,-100,-25,-108,-88,-27,-97,-97,10,
10,
115,111,99,107,101,116,32,61,32,123,10,
32,32,32,32,35,-27,-100,-80,-27,-99,-128,-25,-77,-69,-27,-120,-105,-27,-72,-72,-23,-121,-113,10,
32,32,32,32,65,70,95,85,78,83,80,69,67,32,61,32,65,70,95,85,78,83,80,69,67,44,10,
32,32,32,32,65,70,95,73,78,69,84,32,61,32,65,70,95,73,78,69,84,44,10,
32,32,32,32,65,70,95,73,80,88,32,61,32,65,70,95,73,80,88,44,10,
32,32,32,32,65,70,95,65,80,80,76,69,84,65,76,75,32,61,32,65,70,95,65,80,80,76,69,84,65,76,75,44,10,
32,32,32,32,65,70,95,78,69,84,66,73,79,83,32,61,32,65,70,95,78,69,84,66,73,79,83,44,10,
32,32,32,32,65,70,95,73,78,69,84,54,32,61,32,65,70,95,73,78,69,84,54,44,10,
32,32,32,32,65,70,95,73,82,68,65,32,61,32,65,70,95,73,82,68,65,44,10,
32,32,32,32,65,70,95,66,84,72,32,61,32,65,70,95,66,84,72,44,10,
10,
32,32,32,32,35,-27,-91,-105,-26,-114,-91,-27,-83,-105,-25,-79,-69,-27,-98,-117,-25,-77,-69,-27,-120,-105,-27,-72,-72,-23,-121,-113,10,
32,32,32,32,83,79,67,75,95,83,84,82,69,65,77,32,61,32,83,79,67,75,95,83,84,82,69,65,77,44,10,
32,32,32,32,83,79,67,75,95,68,71,82,65,77,32,61,32,83,79,67,75,95,68,71,82,65,77,44,10,
32,32,32,32,83,79,67,75,95,82,65,87,32,61,32,83,79,67,75,95,82,65,87,44,10,
32,32,32,32,83,79,67,75,95,82,68,77,32,61,32,83,79,67,75,95,82,68,77,44,10,
32,32,32,32,83,79,67,75,95,83,69,81,80,65,67,75,69,84,32,61,32,83,79,67,75,95,83,69,81,80,65,67,75,69,84,44,10,
10,
32,32,32,32,35,-27,-91,-105,-26,-114,-91,-27,-83,-105,-27,-115,-113,-24,-82,-82,-25,-77,-69,-27,-120,-105,-27,-72,-72,-23,-121,-113,10,
32,32,32,32,73,80,80,82,79,84,79,95,73,67,77,80,32,61,32,73,80,80,82,79,84,79,95,73,67,77,80,44,10,
32,32,32,32,73,80,80,82,79,84,79,95,73,71,77,80,32,61,32,73,80,80,82,79,84,79,95,73,71,77,80,44,10,
32,32,32,32,73,80,80,82,79,84,79,95,84,67,80,32,61,32,73,80,80,82,79,84,79,95,84,67,80,44,10,
32,32,32,32,73,80,80,82,79,84,79,95,85,68,80,32,61,32,73,80,80,82,79,84,79,95,85,68,80,44,10,
32,32,32,32,73,80,80,82,79,84,79,95,73,67,77,80,86,54,32,61,32,73,80,80,82,79,84,79,95,73,67,77,80,86,54,44,10,
32,32,32,32,73,80,80,82,79,84,79,95,82,77,32,61,32,73,80,80,82,79,84,79,95,82,77,44,10,
10,
32,32,32,32,35,-25,-79,-69,10,
32,32,32,32,83,111,99,107,101,116,32,61,32,123,125,10,
125,10,
10,
100,101,102,32,115,111,99,107,101,116,46,103,101,116,104,111,115,116,98,121,110,97,109,101,40,110,97,109,101,41,58,10,
32,32,32,32,114,116,32,99,95,103,101,116,104,111,115,116,98,121,110,97,109,101,40,110,97,109,101,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,83,111,99,107,101,116,46,99,108,97,115,115,40,102,97,109,105,108,121,44,32,116,121,112,101,44,32,112,114,111,116,111,99,111,108,41,58,10,
32,32,32,32,118,97,114,32,116,104,105,115,32,61,32,123,10,
10,
32,32,32,32,125,10,
10,
32,32,32,32,35,-26,-120,-112,-27,-111,-104,-27,-113,-104,-23,-121,-113,10,
32,32,32,32,116,104,105,115,46,102,97,109,105,108,121,32,61,32,102,97,109,105,108,121,32,111,114,32,115,111,99,107,101,116,46,65,70,95,73,78,69,84,10,
32,32,32,32,116,104,105,115,46,116,121,112,101,32,61,32,116,121,112,101,32,111,114,32,115,111,99,107,101,116,46,83,79,67,75,95,83,84,82,69,65,77,10,
32,32,32,32,116,104,105,115,46,112,114,111,116,111,99,111,108,32,61,32,112,114,111,116,111,99,111,108,32,111,114,32,48,10,
32,32,32,32,116,104,105,115,46,115,111,99,107,32,61,32,99,95,115,111,99,107,101,116,40,116,104,105,115,46,102,97,109,105,108,121,44,32,116,104,105,115,46,116,121,112,101,44,32,116,104,105,115,46,112,114,111,116,111,99,111,108,41,10,
10,
32,32,32,32,35,-26,-120,-112,-27,-111,-104,-27,-121,-67,-26,-107,-80,10,
32,32,32,32,116,104,105,115,46,115,101,110,100,116,105,109,101,111,117,116,32,61,32,115,111,99,107,101,116,46,115,101,110,100,116,105,109,101,111,117,116,10,
32,32,32,32,116,104,105,115,46,114,101,99,118,116,105,109,101,111,117,116,32,61,32,115,111,99,107,46,114,101,99,118,116,105,109,101,111,117,116,10,
32,32,32,32,116,104,105,115,46,98,105,110,100,32,61,32,115,111,99,107,101,116,46,98,105,110,100,10,
32,32,32,32,116,104,105,115,46,108,105,115,116,101,110,32,61,32,115,111,99,107,101,116,46,108,105,115,116,101,110,10,
32,32,32,32,116,104,105,115,46,97,99,99,101,112,116,32,61,32,115,111,99,107,101,116,46,97,99,99,101,112,116,10,
32,32,32,32,116,104,105,115,46,99,111,110,110,101,99,116,32,61,32,115,111,99,107,101,116,46,99,111,110,110,101,99,116,10,
32,32,32,32,116,104,105,115,46,115,101,110,100,32,61,32,115,111,99,107,101,116,46,115,101,110,100,10,
32,32,32,32,116,104,105,115,46,114,101,99,118,32,61,32,115,111,99,107,101,116,46,114,101,99,118,10,
32,32,32,32,116,104,105,115,46,99,108,111,115,101,32,61,32,115,111,99,107,101,116,46,99,108,111,115,101,10,
10,
32,32,32,32,114,116,32,116,104,105,115,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,115,101,110,100,116,105,109,101,111,117,116,40,115,101,99,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,115,101,99,32,111,114,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
32,32,32,32,114,116,32,99,95,115,101,110,100,116,105,109,101,111,117,116,40,116,104,105,115,46,115,111,99,107,44,32,115,101,99,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,114,101,99,118,116,105,109,101,111,117,116,40,115,101,99,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,115,101,99,32,111,114,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
32,32,32,32,114,116,32,99,95,114,101,99,118,116,105,109,101,111,117,116,40,116,104,105,115,46,115,111,99,107,44,32,115,101,99,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,98,105,110,100,40,105,112,44,32,112,111,114,116,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
10,
32,32,32,32,116,104,105,115,46,105,112,32,61,32,105,112,32,111,114,32,48,10,
32,32,32,32,116,104,105,115,46,112,111,114,116,32,61,32,112,111,114,116,32,111,114,32,56,48,10,
32,32,32,32,114,116,32,99,95,98,105,110,100,40,116,104,105,115,46,115,111,99,107,44,32,116,104,105,115,46,105,112,44,32,116,104,105,115,46,112,111,114,116,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,108,105,115,116,101,110,40,97,109,111,117,110,116,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
10,
32,32,32,32,116,104,105,115,46,97,109,111,117,110,116,32,61,32,97,109,111,117,110,116,32,111,114,32,53,10,
32,32,32,32,114,116,32,99,95,108,105,115,116,101,110,40,116,104,105,115,46,115,111,99,107,44,32,116,104,105,115,46,97,109,111,117,110,116,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,97,99,99,101,112,116,40,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
10,
32,32,32,32,118,97,114,32,99,108,105,101,110,116,32,61,32,110,101,119,40,115,111,99,107,101,116,46,83,111,99,107,101,116,44,32,116,104,105,115,46,102,97,109,105,108,121,44,32,116,104,105,115,46,116,121,112,101,44,32,116,104,105,115,46,112,114,111,116,111,99,111,108,41,10,
32,32,32,32,99,108,105,101,110,116,46,115,111,99,107,32,61,32,99,95,97,99,99,101,112,116,40,116,104,105,115,46,115,111,99,107,41,10,
32,32,32,32,114,116,32,99,108,105,101,110,116,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,99,111,110,110,101,99,116,40,105,112,44,32,112,111,114,116,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,105,112,32,111,114,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
32,32,32,32,116,104,105,115,46,105,112,32,61,32,105,112,10,
32,32,32,32,116,104,105,115,46,112,111,114,116,32,61,32,112,111,114,116,32,111,114,32,56,48,10,
32,32,32,32,99,95,99,111,110,110,101,99,116,40,116,104,105,115,46,115,111,99,107,44,32,116,104,105,115,46,105,112,44,32,116,104,105,115,46,112,111,114,116,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,115,101,110,100,40,100,97,116,97,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,100,97,116,97,32,111,114,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
10,
32,32,32,32,99,95,115,101,110,100,40,116,104,105,115,46,115,111,99,107,44,32,100,97,116,97,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,114,101,99,118,40,97,109,111,117,110,116,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
10,
32,32,32,32,97,109,111,117,110,116,32,61,32,97,109,111,117,110,116,32,111,114,32,49,48,50,52,10,
10,
32,32,32,32,114,116,32,99,95,114,101,99,118,40,116,104,105,115,46,115,111,99,107,44,32,97,109,111,117,110,116,41,10,
59,10,
10,
100,101,102,32,115,111,99,107,101,116,46,99,108,111,115,101,40,41,58,10,
32,32,32,32,105,102,32,110,111,116,32,116,104,105,115,46,115,111,99,107,58,10,
32,32,32,32,32,32,32,32,114,116,32,110,117,108,108,10,
32,32,32,32,59,10,
10,
32,32,32,32,99,95,99,108,111,115,101,40,116,104,105,115,46,115,111,99,107,41,10,
32,32,32,32,116,104,105,115,46,115,111,99,107,32,61,32,110,117,108,108,10,
59,10,
10,
0};
#endif
void ElsLib_socket_libinit(els_VmObj *vm){
	vm_register(vm,"c_gethostbyname",ELSAPI_socket_c_gethostbyname);
	vm_register(vm,"c_socket",ELSAPI_socket_c_socket);
	vm_register(vm,"c_recvtimeout",ELSAPI_socket_c_recvtimeout);
	vm_register(vm,"c_close",ELSAPI_socket_c_close);
	vm_register(vm,"c_SOCK_STREAM",ELSAPI_socket_c_SOCK_STREAM);
	vm_register(vm,"c_bind",ELSAPI_socket_c_bind);
	vm_register(vm,"c_recv",ELSAPI_socket_c_recv);
	vm_register(vm,"c_sendtimeout",ELSAPI_socket_c_sendtimeout);
	vm_register(vm,"c_send",ELSAPI_socket_c_send);
	vm_register(vm,"c_accept",ELSAPI_socket_c_accept);
	vm_register(vm,"c_connect",ELSAPI_socket_c_connect);
	vm_register(vm,"c_AF_INET",ELSAPI_socket_c_AF_INET);
	vm_register(vm,"c_listen",ELSAPI_socket_c_listen);
	vm_register(vm,"c_constinit",ELSAPI_socket_c_constinit);
	#ifdef ELS_CONF_TOKEN_EN
		vm_dostring(vm,LibScript);
	#endif
};
